/**
 * Auto gen via dbpojo-gen.
 */
package com.us.usws.service.ro.impl;

import java.util.List;

import com.us.usws.dao.MobileAuthDAO;
import com.us.usws.model.domain.system.MobileAuth;
import com.us.usws.service.ro.MobileAuthROService;

/**
 * Service RO impl class
 * @author robot
 */
public class MobileAuthROServiceImpl implements MobileAuthROService {

	/**
	 * DAO instance
	 */
	private MobileAuthDAO dao = new MobileAuthDAO();

	/**
	 * Get Count.
	 */
	@Override
	public int getTotalCount() {
		return dao.getTotalCount();
	}

	/**
	 * Get all list.
	 */
	@Override
	public List<MobileAuth> getAllMobileAuths() {
		return dao.getAllMobileAuths();
	}

	/**
	 * Get all list by pagination.
	 */
	@Override
	public List<MobileAuth> getMobileAuths(int start, int end) {
		return dao.getMobileAuths(start, end);
	}

	/**
	 * Get MobileAuth by primary key.
	 */
	@Override
	public MobileAuth getMobileAuth(Integer id) {
		MobileAuth m = dao.getMobileAuth(id);
		return m;
	}

	@Override
	public MobileAuth getMobileAuthByAuth(String mobileNo, String authCode, String token) {
		MobileAuth ret = dao.getMobileAuthByAuth(mobileNo, authCode, token);
		if (ret == null) {
			ret = dao.getMobileAuthByAuthNoToken(mobileNo, authCode);
		}
		return ret;
	}

}